

const getList = (author, keyword) => {
  // 这里可以从数据库读取数据了。
  const listData = [
    { id: 1, title: '标题1', content: '内容1', anthor: 'zhangsan' },
    { id: 2, title: '标题2', content: '内容2', anthor: 'zhangsan' },
  ];
  return Promise.resolve(listData);
}

const getDetail = (id) => {
  const data = { id: 1, title: '标题1', content: '内容1', anthor: 'zhangsan' };
  return Promise.resolve(data);
}

module.exports = {
  getList,
  getDetail,
}